<?php
if($this->session->userdata('user_login')){
	?>

<?php $this->load->view('admin/header_layout'); ?>


</div>

<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="<?php echo base_url(); ?>js/bootstrap.min.js"></script>

<!--mine-->



<div class="content-inner">
    <div class="marg20-btm">
        <a href="<?php echo site_url('admin/dashboard/add_user'); ?>" class="btn btn-primary">&#43; Add Users </a>
    </div>
    <div class="marg20-btm">
        All Users In MoniStar Forum &nbsp; <span class="badge badge-info"> <?php echo $this->session->userdata('count_member'); ?> </span>

    </div>

    <table class="table table-bordered table-striped">
        <thead>
            <tr>
                <th><input type="checkbox" class="check-all" value="" /></th>
                <th>ID</th>
                <th>First Name</th>
                <th>Last Name</th>
                <th>Gender </th>
                <th>Username </th>
                <th>Email Active </th>
                <th>Nationality</th>
                <th>Address </th>
                <th>Position</th>
                <th>Action </th>

            </tr>
        </thead>
        <tbody>
            <?php
            if ($member->num_rows() > 0) {
                foreach ($member->result() as $row) {
                    //if($row->role_ID == 2){
                    echo '
                               <tr>
                                 <td><input type="checkbox" /></td>
                                 <td>' . $row->id . '</td>
								 <td>' . $row->firstName . '</td>
								 <td>' . $row->lastName . '</td>
								 <td>' . $row->user_gender . '</td>
								 <td>' . $row->user_name . '</td>
                                 <td>' . $row->email . '</a></td>
								 <td>' . $row->user_nationality . '</td>
								 <td>' . $row->user_add . '</td>
								 <td><span class="label">' . $row->role_name . '</span></td>
								 
                                 <td>
                                     <a onClick="return confirm(\'Are you sure to update ?\')" href=' . site_url('admin/dashboard/select_edit') . '/' . $row->id . '  rel="tooltip" title="Edit" class="btn btn-primary"><i class="icon-edit"></i></a>
                                     <a href=' . site_url('admin/dashboard/delete_user') . '/' . $row->id . ' rel="tooltip" title="Delete" class="btn btn-danger" onClick="return confirm(\'Are you sure to delete ?\')"><i class="icon-trash"></i></a>
                                 </td>
                               </tr>';
                    //}
                }
            }
            ?>

        </tbody>
    </table>
    <div class="form-inline">
        <select>
            <option />Bulk Actions 
            <option />Delete 
        </select>
        <input type="submit" value="Submit" class="btn btn-primary" onClick="return confirm('Are you sure ?');" />
    </div>
    <div class="pagination">
        <ul>
            <ul>
                <li><?php echo $pages; ?></li>
            </ul>
        </ul>
    </div>
	
	<?php
} else {
	redirect(base_url());
}
?>
